package d0327;

import java.io.*;
import java.util.Map;
import java.util.TreeMap;
/*
public class WordCount {

    public static void main(String[] args) throws IOException {
        File file=new File("D：\\a.txt");
      //  BufferedReader br=new BufferedReader(new FileReader());
        Map<String,Integer>map=new TreeMap<>();
        String str="";
        StringBuilder sb=new StringBuilder();

      //  while ((str=br.readLine())!=null){
            sb.append(str);

        }
    //    String context =sb.toString();
   ///     String[] words=context.split("[\n.,]");
    //    for (String word:
    //    words){
       //     if (word.equals("")){
      //          continue;
            }
            if (map.get(word)==null){
                map.put(word,1);
            }else{
                int oldValue=map.get(word);
                map.put(word,oldValue+1);
            }
        }
        map.forEach((k,v)-> System.out.println(k+"\t"+v));
    }
}
*/